<h1>Listing Posts</h1>

<table class="tabular">
  <tr>
    <th>Name</th>
    <th>Title</th>
    <th>Content</th>
	<% if current_user.role == 'PDAdmin' %>
		<th></th>
		<th></th>
	<% end %>
  </tr>

<% @posts.each do |post| %>
	<%= render :partial => "post_summary", :locals => { :post => post }%>
<% end %>

<tr>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<% if current_user.role == 'PDAdmin' %>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	<% end %>
</tr>

</table>
<span style="text-align: center;"><%= will_paginate @posts %></span>
<br />